﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BusinessLayer;

namespace PresentationLayer
{
    public partial class CriaFuncionario : Form
    {
        public CriaFuncionario()
        {
            InitializeComponent();
        }

        private void Criar_Click(object sender, EventArgs e)
        {
            this.textNif.SelectAll();
            this.textTelefone.SelectAll();
            this.textEmail.SelectAll();
            this.textEstado.SelectAll();
            this.textNome.SelectAll();
            this.textBoxProf.SelectAll();

            if (FuncionarioActions.CriarFuncionario(this.textNome.SelectedText,
                this.textNif.SelectedText,
                this.textTelefone.SelectedText,
                this.textEmail.SelectedText,
                this.textEstado.SelectedText,
                this.textBoxProf.SelectedText))

                this.Close();
            else MessageBox.Show("Verifique os dados ");
        }
    }
}
